package com.whfc.safety.enums;

/**
 * @author : qzexing
 * @version : 1.0
 * @date : 2020-07-29 16:21
 */
public enum SafetyOptionType {

    REPORT(1, "上报"),

    RECTIFY(2, "整改"),

    REVIEW(3, "复查"),

    VERIFY(4, "核验");

    private Integer value;

    private String desc;

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    SafetyOptionType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static SafetyOptionType parseValue(int value) {
        switch (value) {
            case 1:
                return REPORT;
            case 2:
                return RECTIFY;
            case 3:
                return REVIEW;
            case 4:
                return VERIFY;
            default:
                return null;
        }
    }

}
